package com.example.oasystem.service.impl;

import com.example.oasystem.dao.process.AoaProcessListDaoOfChen;
import com.example.oasystem.entity.process.AoaProcessListOfChen;
import com.example.oasystem.entity.process.ProcessDTOOfChen;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProcessListServiceImplOfChen {
    @Autowired
    AoaProcessListDaoOfChen aoaProcessListDaoOfChen;
    public PageInfo<ProcessDTOOfChen> getProcessLimit(int pageNum, int pageSize, String userName, String text){
        PageHelper.startPage(pageNum,pageSize);
        List<ProcessDTOOfChen> process = aoaProcessListDaoOfChen.getProcess(userName,text);
        PageInfo<ProcessDTOOfChen> pageInfo = new PageInfo<ProcessDTOOfChen>(process);
        return pageInfo;
    }
    public List<ProcessDTOOfChen> getStatusId(int pid){
        return aoaProcessListDaoOfChen.getStatusId(pid);
    }
    public AoaProcessListOfChen findeve(int id){
        return aoaProcessListDaoOfChen.findeve(id);
    }
}
